﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using IEstate.Core.Models;

namespace IEstate.Web.Models
{
    public class CustomViewModel
    {
        [DisplayName("Property type")]
        [Required(ErrorMessage="Please specify category")]
        public Category CategoryType { get; set; }

        [DisplayName("Option")]
        [Required(ErrorMessage="Please specify option")]
        public Option OptionType { get; set; }

        [DisplayName("Min price")]
        [Required(ErrorMessage="Please specify min price")]
        [RegularExpression("^[0-9]+$")]
        public decimal MinPrice { get; set; }

        [DisplayName("Max price")]
        [Required(ErrorMessage="Please specify max price")]
        [RegularExpression("^[0-9]+$")]
        public decimal MaxPrice { get; set; }

        [DisplayName("Bedrooms")]
        public int? Bedrooms { get; set; }
    }
}